package com.hean.datasave;

import java.io.InputStream;
import java.io.OutputStream;

import com.hean.service.FileService;

import android.content.Context;
import android.test.AndroidTestCase;
import android.util.Log;

public class FileServiceTest extends AndroidTestCase {
	private static final String TAG="FileServiceTest";
	public void testSave() throws Exception{
		OutputStream outputStream=this.getContext().openFileOutput("hean.txt", Context.MODE_PRIVATE);
		FileService.save(outputStream, "I am heantai");
	}
	
	public void testRead() throws Exception{
		InputStream inputStream=this.getContext().openFileInput("hean.txt");
		String content=FileService.read(inputStream);
		System.out.println(content);
		Log.i(TAG, content);
	}
	                       
}
